package com.hup.joystick.config;

/**
 * todo 放到MainConfig中
 *
 * @author hugan
 * @date 2020/10/21
 */
public class AppConfig {

    /**
     * 状态轮询每秒帧数
     */
    //public static final int STATE_SCAN_FPS = 1;
    public static final int STATE_SCAN_FPS = 60;
    //public static final int STATE_SCAN_FPS = 90;
    /**
     * 摇杆值上下界范围
     */
    public static final int STICK_RANGE = 2000;
    /**
     * 用于过滤 静止时 摇杆值不为0的情况,"inputDeadZone/盲区"
     * DirectX demo原文"Default to 24% of the +/- xxx range. This is a reasonable default value but can be altered if needed."
     * 目前只测到[XBox series]有此问题
     * todo, 根据不同手柄配置盲区
     */
    //public static final float STICK_IGNORE_PERCENT = 0.24F;
    public static final float STICK_IGNORE_PERCENT = 0.05F;
    public static final float STICK_IGNORE_VALUE = STICK_RANGE * STICK_IGNORE_PERCENT;

    /**
     * 扫描设备轮询间隔
     */
    public static final int DEVICE_SCAN_SPAN = 3000;
    //public static final int DEVICE_SCAN_SPAN = 5000;

}
